home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 3.iso / screensavers / saver27.zip / Saver27.txt < prev    next >
Text File  |  1997-07-25  |  2KB  |  43 lines

  1.  
  2. credits:
  3.  
  4. coding:    Eric Schaefer
  5. gfx:   giger03:     H.R.Giger (found it on ftp://ftp.uni-stuttgart.de)
  6.        O3dfx:       stole it from the Operation-3Dfx web page
  7.  
  8. Well, actually, I wanted to do a lot more, but it's exams time and I don't
  9. have very much sparetime. If you are a real optimizations crack, don't
  10. look at the source codes (trust me :-). I'm using c-lib sin() and cos()
  11. in the inner loop and did not optimize a bit...
  12. It still runs very smooth on my i586mmx/166 (overclocked to 187),
  13. Diamond Monster 3D and NT/W95. I also tested it with 2nd level cache
  14. disabled and it did still run smooth.
  15.  
  16. tech:
  17. I am using a set of vertices (the basic shape of the tunnel) to generate
  18. the tunnel at runtime. When a segment gets out of sight (behind you),
  19. it gets appended at the end to make the tunnel infinite. Since the
  20. coordinate space is limited, it starts at the beginning, when it reaches
  21. the end of a period (of sine/cosine).
  22. The twist is done using a sine function for up/down movement and a cosine
  23. for left/right (same amplitude and frequency/period).
  24. The 3Dfx-chip uses color/texture-settings for vertices, not faces. That's
  25. why I redefine texture settings for each face, since the vertices are
  26. shared among several faces.
  27. The most easy thing is the fog:
  28. Set fog color, set fog mode (ITERATED_ALPHA), apply good values to the alpha
  29. component depending on the z-value of a vertex -> nice little fog/haze.
  30.  
  31. I hope this screensaver encourages you to try it yourself:
  32. code a 3Dfx demo or even a game. It's not that hard at all.
  33. If you already got some 3D experience, it should be very easy to you...
  34.  
  35.  
  36. Eric Schaefer
  37. Schevenstr. 45
  38. 01326 Dresden
  39. Germany
  40.  
  41. es5@inf.tu-dresden.de
  42. http://www.inf.tu-dresden.de/~es5
  43.